package com.rxh.controller;

import com.rxh.exception.PayException;
import com.rxh.pojo.Result;
import com.rxh.pojo.core.CoreOrderChange;
import com.rxh.pojo.payment.Refund;
import com.rxh.service.RefundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * User: 王德明
 * Date: 2018/9/27
 * Time: 14:50
 * Project: Management_new
 * Package: com.rxh.controller
 */
@Controller
public class RefundController {

    @Autowired
    private RefundService refundService;

    @RequestMapping(value = "/refund")
    @ResponseBody
    public Result<CoreOrderChange> PostRefund(@RequestBody Refund refund) throws PayException {
        return refundService.getResultMessage(refund);
    }
}
